package com.hszh.common.convert;

import com.hszh.common.dto.other.BoxType;
import com.hszh.common.dto.other.DropdownListBoxTypeDto1;
import com.hszh.common.dto.other.DropdownListBoxTypeDto2;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
//@Mapper(componentModel = "spring",uses = DateTransform.class)
public interface WmsBoxTypeCovertBasic {
    WmsBoxTypeCovertBasic INSTANCE = Mappers.getMapper(WmsBoxTypeCovertBasic.class);

    /**
     * 字段数量类型数量相同，利用工具BeanUtils也可以实现类似效果
     * @param source
     * @return
     */

    DropdownListBoxTypeDto1 toConvertVO1(BoxType source);
    BoxType fromConvertEntity1(DropdownListBoxTypeDto1 dropdownListBoxTypeDto1);

    List<DropdownListBoxTypeDto1> toConvertVOList1(List<BoxType> source);

    /**
     * 字段数量类型相同,数量少：仅能让多的转换成少的，故没有fromConvertEntity2
     * @param source
     * @return
     */
    DropdownListBoxTypeDto2 toConvertVO2(BoxType source);
}